<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:77:"D:\zrhost\ynspsc\code\back\public/../application/admin/view/orders/index.html";i:1499853319;s:82:"D:\zrhost\ynspsc\code\back\public/../application/admin/view/public/headerbase.html";i:1500460707;s:76:"D:\zrhost\ynspsc\code\back\public/../application/admin/view/public/left.html";i:1500081818;s:78:"D:\zrhost\ynspsc\code\back\public/../application/admin/view/public/footer.html";i:1500081818;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cn">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>公众平台自助引擎-中微信通</title>
		<meta name="keywords" content="" />
		<meta name="description" content="一款免费开源的微信公众平台管理系统，是国内最完善移动网站及移动互联网技术解决方案。" />
		<link rel="shortcut icon" href="__PUBLIC__/favicon.ico" />
		<link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet">
		<link href="__PUBLIC__/css/common.css" rel="stylesheet">
		<script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.1.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/util.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/require.js"></script>
		<link rel="stylesheet" href="__PUBLIC__/zrUploads/control/css/zyUpload.css" type="text/css" />
   
    <!-- 引用核心层插件 -->
    <script type="text/javascript" src="__PUBLIC__/zrUploads/core/zyFile.js"></script>

    <!-- 引用控制层插件 -->
    <script type="text/javascript" src="__PUBLIC__/zrUploads/control/js/zyUpload.js"></script>
    <!-- 引用初始化JS -->
    <script type="text/javascript" src="__PUBLIC__/zrUploads/demo.js"></script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/lang/zh-cn/zh-cn.js"></script>
		<style>
			.act{
				background-color: #428BCA;
			}
		</style>
	</head>

	<body data-skin="default" class=" ">
		<div class="loader" style="display:none">
			<div class="la-ball-clip-rotate">
				<div></div>
			</div>
		</div>
		<div class="head">
			<nav class="navbar navbar-default" role="navigation">
				<div class="container ">
					<div class="navbar-header">
						<a class="navbar-brand" href="http://localhost/upload/">
							<img src="__PUBLIC__/images/logo.png" class="pull-left" width="110px" height="35px">
							<span class="version">1.0.0</span>
						</a>
					</div>
					<div class="collapse navbar-collapse">
						<ul class="nav navbar-nav navbar-left">
							<li class="active">
								<a href="<?php echo url('Index/index'); ?>">系统管理</a>
							</li>
						</ul>
						<ul class="nav navbar-nav navbar-right">
							<li class="dropdown">
								<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="wi wi-user color-gray"></i><?php echo session('username'); ?><span class="caret"></span></a>
								<ul class="dropdown-menu color-gray" role="menu">
									<li>
										<a href="<?php echo url('Index/index'); ?>" target="_blank"><i class="wi wi-account color-gray"></i> 我的账号</a>
									</li>
									<li class="divider"></li>
									<li>
										<a href="<?php echo url('Login/loginout'); ?>"><i class="fa fa-sign-out color-gray"></i> 退出系统</a>
									</li>
								</ul>
							</li>
						</ul>
					</div>
				</div>
			</nav>
		</div>
		<div class="main">
			<div class="container">
				<div class="panel panel-content main-panel-content ">
					<div class="content-head panel-heading main-panel-heading">
						<span class="font-lg"><i class="wi wi-setting"></i> 系统管理</span>
					</div>
					<div class="panel-body clearfix main-panel-body ">
<div class="left-menu">
	<div class="left-menu-content">
		<div class="left-menu-top skin-black">

			<div class="font-lg title-setting"><i class="wi wi-setting"></i> 系统管理</div>
		</div>
		<div class="panel panel-menu">
			<div class="panel-heading">
				<span class="no-collapse">帐户/用户<i class="wi wi-appsetting pull-right setting"></i></span>
				<span class="" data-toggle="collapse" data-target="#frame-user" onclick="util.cookie.set('menu_fold_tag:user', util.cookie.get('menu_fold_tag:user') == 1 ? 0 : 1)">帐户/用户<i class="wi wi-down-sign-s pull-right"></i></span>
			</div>

			<ul class="list-group collapse in" id="frame-user">
				<li class="list-group-item <?php if($a == 'Index'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Index/index'); ?>" class="text-over">
						<i class="wi wi-account"></i> 我的帐户 </a>
				</li>
			</ul>
		</div>
		<div class="panel panel-menu">
			<div class="panel-heading">
				<span class="no-collapse">菜单列表<i class="wi wi-appsetting pull-right setting"></i></span>
			</div>

			<ul class="list-group collapse in" id="frame-wxplatform">
				<li class="list-group-item <?php if($a == 'Banner'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Banner/index'); ?>" class="text-over">
						<i class="fa fa-photo"></i> 首页轮播图 </a>
				</li>
				<li class="list-group-item <?php if($a == 'Cate'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Cate/index'); ?>" class="text-over">
						<i class="wi wi-notice"></i> 商品分类 </a>
				</li>
				<!-- <li class="list-group-item <?php if($a == 'Coupon'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Coupon/index'); ?>" class="text-over">
						<i class="wi wi-message"></i> 优惠券管理 </a>
				</li> -->
				<li class="list-group-item <?php if($a == 'Brand'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Brand/index'); ?>" class="text-over">
						<i class="wi wi-notice"></i> 品牌管理 </a>
				</li>
				<li class="list-group-item <?php if($a == 'Goods'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Goods/index'); ?>" class="text-over">
						<i class="wi wi-template"></i> 商品管理 </a>
				</li>
				<li class="list-group-item <?php if($a == 'Orders'): ?>act<?php endif; ?>">
					<a href="<?php echo url('Orders/index'); ?>" class="text-over">
						<i class="wi wi-registersite"></i> 订单管理 </a>
				</li>
				<li class="list-group-item <?php if($a == 'User'): ?>act<?php endif; ?>">
					<a href="<?php echo url('User/index'); ?>" class="text-over">
						<i class="wi wi-template"></i> 用户管理 </a>
				</li>
			</ul>
		</div>
	</div>
</div>
<div class="right-content">
<ul class="we7-page-tab">
	<li class="active">品牌展示</li>
</ul>
<div class="clearfix">
	<form action="" method="get" class="we7-form" role="form">
	<select name="ostarts" id="">
			<option name="ostarts" value="-1">请选择</option>
			<option name="ostarts" value="0">待支付</option>
			<option name="ostarts" value="1">待发货</option>
			<option name="ostarts" value="2">已发货</option>
			<option name="ostarts" value="3">已完成</option>
		</select>
	<div class="input-group pull-left col-sm-4">
		<input type="text" name="omobile" id="omobile" value="" class="form-control" placeholder="搜索联系电话"/>
		<span class="input-group-btn"><button class="btn btn-default" onclick="sear()"><i class="fa fa-search">搜索</i></button></span>
	</div>
	<div class="form-group">
			<!-- <div class="pull-right">
				<a href="<?php echo url('Brand/addlist'); ?>" class="btn btn-primary">添加品牌</a>
			</div> -->
		</div>
	</form>
	<table class="table we7-table table-hover">
		<col width="100px"/>
		<col width="100px"/>
		<col width="100px"/>
		<col width="100px"/>
		<col width="100px"/>
		<col width="150px"/>
		<col width="100px"/>
		<tr>
			<th>排序</th>
			<th>收件人</th>
			<th>联系电话</th>
			<th>收货地址</th>
			<th>订单号</th>
			<th>状态</th>
			<th>操作</th>
		</tr>
		<?php if(is_array($orders) || $orders instanceof \think\Collection || $orders instanceof \think\Paginator): if( count($orders)==0 ) : echo "" ;else: foreach($orders as $key=>$val): ?>
		<tr>
			<th><span><?php echo $val['oid']; ?></span></th>
			<th><span><?php echo $val['ousername']; ?></span></th>
			<th><span><?php echo $val['omobile']; ?></span></th>
			<th><span><?php echo $val['oaddress']; ?></span></th>
			<th><span><?php echo $val['order_sn']; ?></span></th>
			<th><span id="ostarts<?php echo $val['oid']; ?>"><?php if($val['ostarts'] == 0): ?>待付款<?php elseif($val['ostarts'] == 1): ?><button onclick="sendOrder(<?php echo $val['oid']; ?>)">待发货</button><?php elseif($val['ostarts'] == 2): ?>已发货<?php else: ?>已完成<?php endif; ?></span></th>
			<th>
				<span class="link-group">
					<a href="<?php echo url('Orders/update'); ?>?oid=<?php echo $val['oid']; ?>">查看</a>
					<a href="javascript:;" class="del" onclick="del(this,<?php echo $val['oid']; ?>)">删除</a>
				</span>
			</th>
		</tr>
		<?php endforeach; endif; else: echo "" ;endif; ?>
	</table>
	<div class="pull-right">
		<?php echo $page; ?>
	</div>
</div>
			</div>
		</div>
	</div>
</div>
</div>
<script type="text/javascript">
	function sear(){
		var omobile=$('#omobile').val();
			$.ajax({
	        url: "<?php echo url('Orders/index'); ?>",
	        data:{'omobile':omobile},
	        type: "post",
	        dataType: "json",
	        success: function (me) {
	        }
    	});
	}
	function del(obj,oid){
		if(!confirm('确定删除吗')){
			return false;
		}
		$.ajax({
	        url: "<?php echo url('Orders/del'); ?>",
	        data:{'oid':oid},
	        type: "post",
	        dataType: "json",
	        success: function (mega) {
	          if(mega==1){
	           		obj.parentNode.parentNode.parentNode.remove();
	           }else{
	           		util.message('删除失败', '', '');
	           }
	        }
    	});
	}
	function sendOrder(oid)
	{	
		
		var oid=oid;
		if(!confirm('是否改为已发货')){
			return false;
		}
		$.ajax({
			url:"<?php echo url('Orders/sendOrder'); ?>",
			data:{'oid':oid},
			type:"post",
			dataType:"json",
			success:function(msg)
			{
				if(msg==1)
				{
					util.message('发货成功', '', '');
					$("#ostarts"+oid).html("已发货");
				}else{
					util.message('发货异常', '', '');
				}
			}
		})
	}	
</script>
				</div>
			</div>
		</div>
	</div>
	<div class="container-fluid footer text-center" role="footer">
		<div class="friend-link" style="color:#000">
			<a href="http://www.zhongweixintong.com">QQ:553101513&nbsp;&nbsp;联系电话:010-64125951/64125035</a>
		</div>
		<div style="color:#000">
			<a href="http://www.zhongweixintong.com"><b>中微信通</b></a> v1.0.0 &copy; 2014-2017
			<a href="http://www.zhongweixintong.com">www.zhongweixintong.com</a>
		</div>
	</div>
</body>
</html>
